package cn.miju.common.content;

/**
 * <pre>
 * 业务类
 * </pre>
 *
 * @author zhuming
 * @version 1.0.0
 * @since 2023-03-01 14:56
 */
public enum CodeMessage {
    // 成功
    SUCCESS(0, "交易成功！"),
    // 失败
    FAIL(-1, "交易失败！"),
    //非法请求（请求被篡改或重用）
    ILLEGAL_REQUEST(-2, "非法请求，拒绝访问！"),
    // 解密失败
    DECRYPT_FAIL(-3, "解密失败，数据未加密或格式错误！"),
    //参数校验失败
    VALIDATE_FAIL(-4, "参数校验失败！"),
    //交易不存在
    TRADE_NOT_EXIT(-10, "交易不存在！"),
    //无交易权限
    TRADE_NOT_AUTH(-11, "无交易权限！"),
    DATA_ERROR(-10, "数据异常！%s"),
    ;

    private Integer code;
    private String message;

    public Integer getCode() {
        return code;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
    CodeMessage(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
